package com.xianyun.site.iblog.gatewayimpl;

import com.alibaba.cola.dto.Response;
import com.alibaba.fastjson.JSON;
import com.xianyun.site.iblog.gatewayimpl.common.BaseSupportGatewayImpl;
import com.xianyun.site.support.dto.clientobject.SmtpMessageCO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 邮件网关实现
 * @author mac_zyj
 */
@Slf4j
@Component
public class SmtpGatewayImpl extends BaseSupportGatewayImpl {

    public Response sendSmtpMessage(SmtpMessageCO smsMessage){
        //构建消息体
        String messageString = JSON.toJSONString(smsMessage);
        return sendMessage(messageString,smsMessage.getTransactionId(),"SUPPORT_MESSAGE");
    }
}
